﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package com.facebook.utils {
    import flash.system.*;

    public class PlayerUtils {

        protected static var versionObj:Object;

        public static function get internalBuildNumber():Number{
            return (parseVersionString().internalBuildNumber);
        }
        public static function get platform():String{
            return (parseVersionString().platform);
        }
        public static function get buildNumber():Number{
            return (parseVersionString().buildNumber);
        }
        public static function get minorVersion():Number{
            return (parseVersionString().minorVersion);
        }
        public static function parseVersionString():Object{
            if (versionObj != null){
                return (versionObj);
            };
            var _local1:String = Capabilities.version;
            versionObj = {};
            var _local2:Array = _local1.split(" ");
            versionObj.platform = _local2[0];
            _local2.shift();
            _local2 = _local2[0].split(",");
            versionObj.majorVersion = Number(_local2[0]);
            versionObj.minorVersion = Number(_local2[1]);
            versionObj.buildNumber = Number(_local2[2]);
            versionObj.internalBuildNumber = Number(_local2[3]);
            return (versionObj);
        }
        public static function get majorVersion():Number{
            return (parseVersionString().majorVersion);
        }

    }
}//package com.facebook.utils 
